package com.mico.example.springboot.config.domain;

import lombok.Data;
import lombok.ToString;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * Created by micocube
 * ProjectName: springboot-example
 * PackageName: com.mico.example.springboot.config.domain
 * User: micocube
 * Email: ldscube@gmail.com
 * CreateTime: 2019/2/25上午10:54
 * ModifyTime: 2019/2/25上午10:54
 * Version: 0.1
 * Description:在类上使用@ConfigurationProperties或者在字段上使用@Value注解
 **/
@PropertySource(value = "classpath:person.properties")
@ConfigurationProperties(prefix = "config")
@Data
@ToString
@Component
public class ConfigFromOtherFile {
    private String name;
    private String age;
    private String desc;
}
